import { useIcon } from "@konghayao/vue-material-icons/src/components/useIcon";
import { createPinia } from "pinia";
import { createApp } from "vue";
import App from "./App.vue";
import "@vant/touch-emulator";
import { Lazyload } from "vant";
import piniaPluginPersist from "pinia-plugin-persist";
import router from "./router";
import localforage from "localforage";

localforage.config({
    driver: localforage.INDEXEDDB,
    name: "ProPixel",
    version: 1.0,
    storeName: "ProPixel",
    description: "This is a store of ProPixel",
});

useIcon();
createApp(App)
    .use(router)
    .use(createPinia().use(piniaPluginPersist))
    .use(Lazyload, {
        lazyComponent: true,
    })
    .mount("#app");
